package homework3;

public class Son extends Father {
	public String v = "Son";

	public Son() {
		super();
		System.out.println("Son无参数构造方法被调用!");
	}

	public Son(String str) {
		super(str);
		System.out.println("Son带参数构造方法被调用!");
	}

	public void outinfo() {
		System.out.println("Son的outinfo()方法被调用");
	}

	public void test() {
		String v = "哈哈哈哈!";
		System.out.println("------1-----");
		System.out.println(v);
		System.out.println(this.v);
		System.out.println(super.v);
		System.out.println("------2-----");
		System.out.println(x);
		System.out.println(super.x);
		System.out.println("------3-----");
		outinfo();
		this.outinfo();
		super.outinfo();
	}
}
